﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/default.master" Theme="default"
    Inherits="MediaMonitor.Admin.Register" CodeBehind="register.aspx.cs" %>


<asp:Content  ContentPlaceHolderID="Body" runat="server">
    <div class="Box Highlight">
        <!--Your contents goes here-->
        <asp:UpdatePanel ID="pnlUpdate" runat="server">
            <ContentTemplate> 
                <div>
                    <asp:Label ID="lblMsg" runat="server" SkinID="Info" />
                </div> 
                <asp:Panel ID="pnlContents" runat="server" DefaultButton="btnSave">
                    <table width="100%">
                        <tr>
                            <td colspan="2">
                            </td>
                        </tr>
                        <tr>
                            <td>Role</td>
                            <td>
                                <asp:DropDownList ID="lstRole" runat="server">
                                    <asp:ListItem Selected="True">user</asp:ListItem>
                                    <asp:ListItem>company</asp:ListItem>
                                    <asp:ListItem>admin</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="th">
                                Your Email
                            </td>
                            <td>
                                <asp:TextBox ID="tbEmail" runat="server" MaxLength="100" Width="200px" ValidationGroup="reg" />
                                <asp:RegularExpressionValidator ErrorMessage="Invalid Email" ID="revEmail" runat="server"
                                    ControlToValidate="tbEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                    Display="Dynamic" ValidationGroup="reg" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbEmail"
                                    Display="Dynamic" ErrorMessage="Email required" ValidationGroup="reg"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="th">
                                Password
                            </td>
                            <td>
                                <asp:TextBox ID="tbPassword" TextMode="Password" runat="server" MaxLength="20" Width="200px"
                                    ValidationGroup="reg" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="tbPassword"
                                    Display="Dynamic" ErrorMessage="Required" ValidationGroup="reg"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="th">
                                Retype Password
                            </td>
                            <td>
                                <asp:TextBox ID="tbPassword2" runat="server" TextMode="Password" MaxLength="20" Width="200px"
                                    ValidationGroup="reg" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="tbPassword2"
                                    Display="Dynamic" ErrorMessage="Required" ValidationGroup="reg"></asp:RequiredFieldValidator>
                                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="tbPassword"
                                    ControlToValidate="tbPassword2" Display="Dynamic" ErrorMessage="Both passwords dont match"
                                    ValidationGroup="reg"></asp:CompareValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="th">
                                Username:
                            </td>
                            <td>
                                <asp:TextBox ID="tbScreenName" runat="server" MaxLength="50"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="tbScreenName"
                                    Display="Dynamic" ErrorMessage="Required" ValidationGroup="reg"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="revScreenName" runat="server" ControlToValidate="tbScreenName"
                                    Display="Dynamic" ErrorMessage="Invalid Page Name" ValidationExpression="\b[A-Za-z0-9_-]{5,50}\b"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        
                       
                        <tr>
                            <td>
                            </td>
                            <td>
                                <br />
                                <asp:Button ID="btnSave" runat="server" Text="Submit" SkinID="Submit" 
                                    ValidationGroup="reg" onclick="btnSave_Click" />
                                    <asp:ImageButton ID="btnCancel" runat="server" SkinID="Cancel" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
              
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
 
